/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package MeshlessShapeFunctions;

/**
 *
 * @author mark
 */
public class Particle implements Comparable<Particle> {
    double x;
    protected double y;
    protected double rho;
    protected int Number;

    public Particle(double x, double y, int Number) {
        this.x = x;
        this.y = y;
        this.Number = Number;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public int getNumber() {
        return Number;
    }
    
    public void setNumber(int number) {
		Number = number;
	}
    
    @Override
    public String toString() {
    	
    	return "(\t"+x+"\t;\t"+y+"\t)\t"+Number;
    }

    public double getRho() {
		return rho;
	}
    
    public void setRho(double rho) {
		this.rho = rho;
	}
    
	@Override
	public int compareTo(Particle o) {
		if(this.getX()>o.getX()){return 1;}
		if(this.getX()<o.getX()){return -1;}
		return 0;
	}
    
    
    

}
